var P = {
    lli: 0,//左侧索引
    rli: 0,//右侧索引
    playi: 0,//播放位置索引
    playid: 0,//播放ID索引
    page: 1,//分页ID索引
    temp: [],
    list: []
};
var Ph = {
    add: function (did) {
        did = did + '';
        var str = '';
        var cookien = 60;
        var fid = $.cookie("playhistory");
        if (fid) {
            fid = fid.split(',');
            var exist = $.inArray(did, fid);
            if (exist >= 0) {
                fid.splice(exist, 1)
            }
            ;
            fid.unshift(did);
            if (fid.length > cookien) {
                fid.splice(cookien, (fid.length - cookien))
            }
            str = fid.join(',');
        } else {
            str = did
        }
        $.cookie('playhistory', str, {path: '/', expires: 365, domain: baseDomain});
    },
    del: function () {
        var t = [];
        $('#plist_ul i.selected').each(function () {
            t.push($(this).attr('v'))
        });
        t = t.join(',');
        if (t) {
            Ph.d(t)
        } else {
            Dj.Tip('请选择要删除的舞曲！', 1)
        }
    },
    qk: function () {
        var r = confirm('确定要清空历史播放记录？');
        if (r == true) {
            P.list[1] = '';
            $.cookie('playhistory', '', {path: '/', expires: 365, domain: baseDomain});
            if (P.lli == 1) {
                Amy.cs(1)
            }
        }
    },
    d: function (did) {
        var did1 = did.split(',');
        var did2 = $.cookie("playhistory").split(',');
        var did3 = P.list[1].split('||');
        for (var i = 0; i < did1.length; i++) {
            var exist = $.inArray(did1[i], did2);
            if (exist >= 0) {
                did2.splice(exist, 1);
                did3.splice(exist, 1)
            }
        }
        $.cookie('playhistory', did2.join(','), {path: '/', expires: 365, domain: baseDomain});
        P.list[1] = did3.join('||');
        if (P.lli == 1) {
            Amy.cs(1)
        }
    }
};
var Pb = {
    del: function () {
        var t = [];
        $('#plist_ul i.selected').each(function () {
            t.push($(this).attr('v'))
        });
        t = t.join('_');
        if (t) {
            Pb.d(t)
        } else {
            Dj.Tip('请选择要删除的舞曲！', 1)
        }
    },
    d: function (did) {
        var did1 = did.split('_');
        var did2 = P.temp.split('_');
        var did3 = P.list[0].split('||');
        for (var i = 0; i < did1.length; i++) {
            var exist = $.inArray(did1[i], did2);
            if (exist >= 0) {
                did2.splice(exist, 1);
                did3.splice(exist, 1)
            }
        }
        P.temp = did2.join('_');
        P.list[0] = did3.join('||');
        if (P.lli == 0) {
            Amy.cs(0)
        }
    }
};
var Amy = {
    no: function (t) {
        $(t).attr({'class': 'addno', 'onclick': ''})
    },
    page: function (t) {
        if (t) {
            P.page++;
        } else {
            P.page--;
        }
        ;
        Amy.cs(P.lli)
    },
    del: function (did, name) {
        var r = confirm('您确定要删《' + name + '》吗？');
        if (r == true) {
            $('<div/>').appendTo('body').attr('id', 'overlayb').css({'height': $(document).height()});
            $.ajax({
                type: "GET",
                cache: false,
                dataType: "jsonp",
                jsonp: "callback",
                url: Dj.userurl + 'ajax',
                data: "a=del&ku=list&id=" + did + "&callback=?",
                success: function (msg) {
                    $("#overlayb").remove();
                    Dj.Tip(msg.txt, msg.status);
                    if (msg.status == '2') {
                        var did1 = 0;
                        var did2 = P.list[2].split('||');
                        for (var i = 0; i < did2.length; i++) {
                            did1 = did2[i].split('$');
                            if (did == did1[0]) {
                                did2.splice(i, 1)
                            }
                        }
                        P.list[2] = did2.join('||');
                        if (P.lli == 2) {
                            Amy.cs(2)
                        }
                    }
                    ;
                }, error: function () {
                    $("#overlayb").remove();
                    Dj.Tip('与Ajax通信出错！', 1);
                }
            });
        }
    },
    cs: function (n) {
        if (!P.list[n]) {
            $('#plist_ul').html('<div class="msg" style="color:#F00">列表已清空</div>')
        } else {
            var html = '';
            var ff = '';
            var did1 = P.list[n].split('||');
            var did2 = P.temp.split('_');
            var pangn = Math.ceil(did1.length / mp.page);
            if (P.page > pangn) {
                P.page = pangn
            }

            var start = (P.page - 1) * mp.page;
            var end = start + mp.page;
            if (end > did1.length) {
                end = did1.length
            }

            for (var i = start; i < end; i++) {
                ff = did1[i].split('$');
                html += '<li id="lsid' + ff[0] + '"' + ((ff[0] == P.playid && n == P.rli) ? ' class="this"' : '') + '>';
                html += '<i v="' + ff[0] + '"></i>';
                html += '<span class="em">';
                if (n == 0) {
                    html += '<em class="del" onclick="Pb.d(\'' + ff[0] + '\')"></em>'
                } else {
                    if (n == 1) {
                        html += '<em class="del mr5" onclick="Ph.d(\'' + ff[0] + '\')"></em>'
                    } else if (n == 2) {
                        html += '<em class="del mr5" onclick="Amy.del(' + ff[0] + ',\'' + ff[1] + '\')"></em>'
                    }
                    if ($.inArray(ff[0], did2) >= 0) {
                        html += '<em class="addno"></em>'
                    } else {
                        html += '<em class="add" onclick="B.A(' + ff[0] + ');Amy.no(this)"></em>'
                    }
                }
                html += '</span>';
                var sun = '0' + (i + 1);
                sun = sun.substr(-2);
                html += '<span class="on"><span class="sun">' + sun + '.</span><a href="javascript:void(0)" onclick="mp.duqu(' + n + ',' + i + ',' + ff[0] + ')">' + ff[1] + '</a></span>';
                html += '</li>';
            }
            ;
            $('#plist_ul').html(html);
            B.Bd('plist_ul');
            html = '<li class="l">';
            html += '<i class="qfx" onclick="B.Tf(\'plist_ul\')"></i>';
            if (n == 0) {
                html += '<i class="del" onclick="Pb.del()"></i>';
            } else if (n == 1) {
                html += '<i class="add" onclick="B.Ta(\'plist_ul\')"></i>';
                html += '<i class="qk" onclick="Ph.qk()"></i>';
            } else {
                html += '<i class="add" onclick="B.Ta(\'plist_ul\')"></i>';
            }
            html += '</li>';

            html += '<li class="r">';
            if (n != 1) {
                html += '<span class="plist3fy1">分页：</span>';
            }
            html += '<strong>' + P.page + '</strong><span class="plist3fp">/</span><strong style="color:#F00">' + pangn + '</strong>';
            if (n != 1) {
                html += '<span class="plist3fy2">页</span>';
            }
            if (P.page == 1) {
                html += '<span class="ml8">上一页</span>';
            } else {
                html += '<a href="javascript:void(0)" onclick="Amy.page(0)">上一页</a>';
            }
            if (P.page >= pangn) {
                html += '<span class="ml8">下一页</span>';
            } else {
                html += '<a href="javascript:void(0)" onclick="Amy.page(1)">下一页</a>';
            }
            html += '</li>';
            $('#plist_b').html(html);
        }
    },
    bd: function () {
        var index = $.cookie('playopen') || 0;
        var plistrta = $('#plist_fs a');
        plistrta.eq(index).addClass('this');
        plistrta.on('click', function () {
            var index = plistrta.index($(this));
            plistrta.removeClass("this");
            plistrta.eq(index).addClass("this");
            $.cookie('playopen', index, {path: '/', domain: baseDomain});
        });
        var doc1 = $('#plist_l div');
        var doc2 = $('#plist_ul');
        var doc3 = $('#plist_b');
        doc1.on('click', function () {
            doc1.removeClass('this');
            $(this).addClass('this');
            var i = parseInt(doc1.index($(this)));
            if (i != P.lli) {
                P.lli = i;
                P.page = 1;
                doc2.html(mp.hload);
                doc3.html('');
                if (P.list[i] == null) {
                    if (i == 0) {

                    } else if (i == 1) {
                        if (!$.cookie("playhistory")) {
                            P.list[i] = '';
                            Amy.cs(i)
                        } else {
                            mp.playh(0);
                        }
                    } else if (i == 2) {
                        if ($.cookie('userinfo')) {
                            $.ajax({
                                type: "GET",
                                cache: false,
                                dataType: "jsonp",
                                jsonp: "callback",
                                url: Dj.userurl + 'ajax',
                                data: "a=json&txt=000&callback=?",
                                success: function (msg) {
                                    if (msg) {
                                        var t = [];
                                        $.each(msg, function (x, e) {
                                            t.push(e['id'] + '$' + e['name'])
                                        });
                                        P.list[i] = t.join('||');
                                        Amy.cs(i)
                                    } else {
                                        doc2.html(mp.datan)
                                    }
                                }, error: function () {
                                    doc2.html(mp.error)
                                }
                            })
                        } else {
                            doc2.html('<div class="msg"><span onclick="Us.dialog()" style="color:#F00">请先登录</span></div>');
                            Us.dialog()
                        }
                    } else if (i == 3) {
                        doc2.html('<div class="msg" style="color:#F00">请输入关键词</div>')
                    } else {
                        $.ajax({
                            type: "GET",
                            url: '/playjs/lbdj' + i + '.js',
                            success: function (msg) {
                                var t = [];
                                var data = Object;
                                try {
                                    eval("data=" + msg)
                                } catch (ex) {
                                }
                                ;
                                $.each(data, function (x, e) {
                                    t.push(e['id'] + '$' + e['name'])
                                });
                                P.list[i] = t.join('||');
                                Amy.cs(i)
                            }, error: function () {
                                doc2.html(mp.error)
                            }
                        })
                    }
                } else {
                    Amy.cs(i)
                }
            }
        });

        $('#jp_t31').on('click', function () {
            mp.qiege(1)
        });
        $('#jp_t32').on('click', function () {
            mp.qiege(2)
        });
        var plist1r1 = $('#plist1r1');
        var plist1r2 = $('#plist1r2');
        plist1r1.on('keydown', function (event) {
            if (event.keyCode == 13) {
                plist1r2.click()
            }
        });
        plist1r2.on('click', function () {
            P.lli = 3;
            P.page = 1;
            doc2.html(mp.hload);
            doc3.html('');
            doc1.removeClass('this');
            doc1.eq(3).addClass('this');
            var txt = $.trim(plist1r1.val());
            P.list[3] = '';
            if (txt) {
                $.ajax({
                    type: "GET",
                    dataType: "jsonp",
                    jsonp: "callback",
                    jsonpCallback: "success",
                    url: '/psearch',
                    data: "wd=" + encodeURI(txt) + "&callback=?",
                    success: function (msg) {
                        if (msg) {
                            var t = [];
                            $.each(msg, function (x, e) {
                                t.push(e['id'] + '$' + e['name'])
                            });
                            P.list[3] = t.join('||');
                            Amy.cs(3)
                        } else {
                            doc2.html(mp.datan)
                        }
                    }, error: function () {
                        doc2.html(mp.error)
                    }
                })
            } else {
                doc2.html('<div class="msg" style="color:#F00">请输入关键词</div>')
            }
        });
    }
};
var mp = {
    test: 3,
    page: 12,
    setid: '',
    outid: null,
    date: (new Date).getTime(),
    hload: '<div class="msg">精彩内容马上呈现…</div>',
    datan: '<div class="msg">没有读取到数据！</div>',
    error: '<div class="msg">Ajax通信出错！</div>',
    unload: function () {
        $.cookie('openPlayer', 0, {path: '/', domain: baseDomain})
    },
    setin: function () {
        if ($.cookie('playdate') != mp.date) {
            $("#player").jPlayer("destroy");
            clearInterval(mp.setid);
            $(window).off("unload", mp.unload);
            $('#bf_l').html('<div class="playerno">嗨！看到本页面说明，已有别的页面正在播放舞曲。<br>你可选择<a href="javascript:void(0)" onclick="window.location.reload()">重新播放</a>或<a href="javascript:void(0)" onclick="window.opener=null;window.close();">关闭页面</a></div>');
        } else {
            var myarr = [];
            var newarr = [];
            if (P.temp) {
                myarr = P.temp.split('_')
            }
            if ($.cookie('playerTemp')) {
                myarr = myarr.concat($.cookie('playerTemp').split('_'));
                $.cookie('playerTemp', '', {path: '/', expires: 1, domain: baseDomain})
            }
            ;
            for (var i = 0; i < myarr.length; i++) {
                var items = myarr[i];
                if ($.inArray(items, newarr) == -1) {
                    newarr.push(items)
                }
            }
            ;
            P.temp = newarr.join('_');
            if (P.lli == 0 && newarr.length != 0) {
                var did1 = P.list[0].split('||');
                if (newarr.length != did1.length) {
                    var gotxt = newarr.slice(did1.length, (did1.length + 12));
                    $.ajax({
                        type: "GET",
                        url: '/playjs/bfdj' + gotxt.join('_') + '.js',
                        success: function (msg) {
                            if (msg) {
                                var data = Object;
                                try {
                                    eval("data=" + msg)
                                } catch (ex) {
                                }
                                ;
                                $.each(data, function (x, e) {
                                    did1.push(e['id'] + '$' + e['name'])
                                });
                                P.list[0] = did1.join('||');
                                Amy.cs(0)
                            }
                        }
                    })
                }
            }
        }
    },
    playh: function (l) {
        var fid = $.cookie("playhistory").split(',');
        var did = [];
        if (l) {
            did = P.list[1].split('||')
        }
        if (fid.length != did.length) {
            var gotxt = fid.slice(did.length, (did.length + 12));
            $.ajax({
                type: "GET",
                url: '/playjs/bfdj' + gotxt.join('_') + '.js',
                success: function (msg) {
                    if (msg) {
                        var data = Object;
                        try {
                            eval("data=" + msg)
                        } catch (ex) {
                        }
                        ;
                        $.each(data, function (x, e) {
                            did.push(e['id'] + '$' + e['name'])
                        });
                        P.list[1] = did.join('||');
                        Amy.cs(1)
                    }
                    ;
                    setTimeout(function () {
                        mp.playh(1)
                    }, 1000)
                }, error: function () {
                    setTimeout(function () {
                        mp.playh(1)
                    }, 1000)
                }
            })
        }
    },
    ran: function (i, n) {
        if (n > 1) {
            var x = parseInt(Math.random() * n);
            if (x == i) {
                return mp.ran(i, n)
            } else {
                return x
            }
        } else {
            return 0
        }
    },
    qiege: function (n) {
        var length = 0;
        if (P.list[P.rli]) {
            var fid = P.list[P.rli].split('||');
            length = fid.length;
            if (length > 1) {
                var playi = P.playi;
                if (n == 1) {
                    playi--;
                } else if (n == 2) {
                    playi++;
                } else {
                    var i = $.cookie('playopen') || 0;
                    if (i == '1') {
                        playi = mp.ran(playi, length);
                    } else if (i == '2') {
                    } else {
                        playi++;
                    }
                }
                if (playi >= length) {
                    playi = 0
                } else if (playi < 0) {
                    playi = length - 1
                }
                var playid = fid[playi].split('$');
                mp.duqu(P.rli, playi, playid[0]);

                var pangn = 1;
                if (playi) {
                    pangn = Math.ceil((playi + 1) / mp.page)
                }
                if (pangn != P.page) {
                    P.page = pangn;
                    Amy.cs(P.rli)
                }
            } else {
                setTimeout(function () {
                    $("#jp-play").click()
                }, 600);
            }
        }
    },
    qiequge: function () {
        Pb.d(info.id + '');
        if (P.list[1] == null) {
            var fid = $.cookie("playhistory");
            if (fid) {
                fid = fid.split(',');
                var exist = $.inArray(info.id, fid);
                if (exist >= 0) {
                    fid.splice(exist, 1);
                    $.cookie('playhistory', fid.join(','), {path: '/', expires: 365, domain: baseDomain})
                }
            }
        } else {
            Ph.d(info.id + '')
        }
        ;

        P.lli = 0;
        P.rli = 0;
        P.playi = 0;
        P.page = 1;
        P.playid = 0;
        var doc1 = $('#plist_l div');
        doc1.removeClass('this');
        doc1.eq(0).addClass('this');
        $('#plist_ul').html(mp.hload);
        $('#plist_b').html('');
        if (P.list[0] != '') {
            var fid1 = P.list[0].split('||');
            var fid2 = fid1[0].split('$');
            mp.duqu(0, 0, fid2[0]);
            Amy.cs(0)
        } else {
            $.ajax({
                type: "GET",
                url: '/pqiege',
                data: "tt=2&id=" + info.id,
                success: function (msg) {
                    setTimeout(function () {
                        window.location.href = msg + '.htm';
                    }, 5000);
                }, error: function () {
                    alert('系统错误，请刷页面！')
                }
            })
        }
    },
    qherror: function (t) {
        var txt = '您刚刚读取的数据出错，系统为你切换另一首舞曲！';
        if (t == 1) {
            txt = '您点播的《' + info.name + '》出现错误，系统为你切换另一首舞曲！';
        } else if (t == 2) {
            txt = '您点播的《' + info.name + '》已下线，系统为你切换另一首舞曲！';
        }
        ;
        $('#playerror').html('<ul><a href="javascript:void(0)" onclick="$(\'#playerror\').hide();">关闭提示</a>' + txt + '</ul>').show();
        mp.qiequge();
        mp.test = 3;
    },
    jlerror: function (url) {
        $.ajax({
            type: "GET",
            cache: false,
            dataType: "jsonp",
            jsonp: "callback",
            url: Dj.userurl + 'ajax',
            data: "a=error&id=" + info.id + "&url=" + encodeURIComponent(url) + "&callback=?"
        });
    },
    player: function () {
        var volume = parseFloat($.cookie('volume') || 1);
        if (volume < 0.2) {
            volume = 0.2
        }
        $.jPlayer.timeFormat.showHour = true;
        $("#player").jPlayer({
            ready: function () {
                mp.play()
            },
            volume: volume,
            swfPath: Dj.cdnurl + 'ul/jplayer/',
            ended: function () {
                mp.qiege(3)
            },
            error: function (event) {
                mp.test--;
                if (mp.test < 1) {
                    mp.jlerror(event.jPlayer.status.media.m4a);
                    mp.qherror(1)
                } else {
                    setTimeout(function () {
                        $("#jp-play").click()
                    }, 2000);
                }
            },
            volumechange: function () {
                var w = $("div.jp-volume-bar-value").width() / 62;
                if (w) {
                    $.cookie('volume', w.toFixed(2), {path: '/', expires: 48})
                }
            }
        })
    },
    play: function () {
        $('#playnav li').removeClass('this');
        $('#nav' + info.cid).addClass('this');
        if (info.stats == '0') {
            mp.qherror(2)
        } else {
            var purl = server + info.playurl + '.m4a';
            Ph.add(info.id);
            $("#player").jPlayer("setMedia", {m4a: purl}).jPlayer("play");
            if (mp.outid) {
                clearTimeout(mp.outid);
                mp.outid = null;
            }
            mp.outid = setTimeout(function () {
                mp.order()
            }, 5000);
        }
    },
    order: function () {
        $.ajax({
            type: "GET",
            cache: false,
            dataType: "jsonp",
            jsonp: "callback",
            url: Dj.userurl + 'ajax',
            data: "a=hits&id=" + info.id + "&callback=?",
            success: function (msg) {
                $('#spand').html(msg.d);
                $('#spandb').html(msg.b1 + '%');
                $('#spanc').html(msg.c);
                $('#spancb').html(msg.b2 + '%');
                $('#play_hits').text(msg.h)
            }, error: function () {

            }
        })
    },
    tool: function (t) {
        if (t == 4) {
            B.Gz(info.uid)
        } else if (t == 3) {
            B.F(info.id)
        } else {
            if ($.cookie('test' + info.id)) {
                Dj.Tip('您24小时内已顶（踩）过此舞曲！', 0);
            } else {
                $.cookie('test' + info.id, 1, {path: '/', expires: 1});
                $('#spand,#spandb,#spanc,#spancb').html('提交中…');
                $.ajax({
                    type: "GET",
                    cache: false,
                    dataType: "jsonp",
                    jsonp: "callback",
                    url: Dj.userurl + 'ajax',
                    data: "a=ding&id=" + info.id + "&tt=" + t + "&callback=?",
                    success: function (msg) {
                        $('#spand').html(msg.d);
                        $('#spandb').html(msg.b1 + '%');
                        $('#spanc').html(msg.c);
                        $('#spancb').html(msg.b2 + '%');
//$('#play_hits').text(msg.h)
                    }
                })
            }
        }
    },
    modify: function () {
        document.title = info.name;
        $('#play_name').text(info.name);
        $('#play_hits').text(info.hits);
        $('#play_favs').text(info.favs);
        $('#play_addtime').text(info.addtime);
        $('#spand').html(info.ding);
        $('#spandb').html(info.dingb + '%');
        $('#spanc').html(info.cai);
        $('#spancb').html(info.caib + '%');
        $('#play_down').attr('href', '/down/' + info.id + '.html');
        $('#play_gz').attr('href', Dj.userurl + info.uid + '/gz.html').html('<p>' + info.ucount1 + '</p>关注');
        $('#play_fs').attr('href', Dj.userurl + info.uid + '/fs.html').html('<p>' + info.ucount2 + '</p>粉丝');
        $('#play_wq').attr('href', Dj.userurl + info.uid + '/wq.html').html('<p>' + info.ucount3 + '</p>分享');
        $('#play_username').attr('href', Dj.userurl + info.uid + '/').html(info.username);
        $('#play_userpic').attr('href', Dj.userurl + info.uid + '/').html('<img src="' + Dj.cdnurl + info.userpic + '">');
        $('#play_class').attr('href', '/list/' + info.flhtml + '.html').text(info.flname);
        $('#play_vip').attr('class', 'bf_ck3' + info.ifvip);
    },
    duqu: function (rli, playi, playid) {
        $("#player").jPlayer("stop");
        $('#plist_ul li').removeClass('this');
        $('#lsid' + playid).addClass('this')
        P.rli = rli;
        P.playi = playi;
        P.playid = playid;
        $.ajax({
            type: "GET",
            url: '/playjs/dqdj' + playid + '.js',
            success: function (msg) {
                if (msg) {
                    var data = Object;
                    try {
                        eval("data=" + msg)
                    } catch (ex) {
                    }
                    ;
                    info = data;
                    mp.play();
                    mp.modify();
                } else {
                    mp.qherror(3)
                }
            }, error: function () {
                mp.qherror(3)
            }
        })
    },

    report_close: function () {
        $("#overlay").remove();
        $("#play_jb").remove()
    },
    report_get: function () {
        var data = 'a=report&id=' + info.id + '&type=' + $("input[name='reporttype']:checked").val() + '&text=' + encodeURIComponent($('#reporttext').val());
        $('#reportida').hide();
        $.ajax({
            type: "GET",
            cache: false,
            dataType: "jsonp",
            jsonp: "callback",
            url: Dj.userurl + 'ajax',
            data: data, timeout: 3000,
            error: function () {
                alert('通讯出错，请重试！');
                $('#reportida').show()
            }, success: function (msg) {
                if (msg == 'ok') {
                    alert('举报成功！');
                    $("#overlay").remove();
                    $("#play_jb").remove()
                } else {
                    alert(msg);
                    $('#reportida').show()
                }
            }
        });
    },
    report: function () {
        var html = '<div class="play_jb_bt">举报<a href="javascript:void(0)" onclick="mp.report_close()"></a></div>';
        html += '<div class="play_jb_1">如果你觉得该声音内容存在问题，欢迎向管理员举报：</div>';
        html += '<ul class="play_jb_2 q">';
        html += '<li><label><input name="reporttype" type="radio" value="1">含有反动内容</label></li>';
        html += '<li><label><input name="reporttype" type="radio" value="2">版权侵权</label></li>';
        html += '<li><label><input name="reporttype" type="radio" value="3">广告欺诈</label></li>';
        html += '<li><label><input name="reporttype" type="radio" value="4">包含色情内容</label></li>';
        html += '<li><label><input name="reporttype" type="radio" value="5" checked="checked">其他</label></li>';
        html += '</ul>';
        html += '<ul class="play_jb_3 q">';
        html += '<li class="play_jb_31">说明</li>';
        html += '<li class="play_jb_32"><textarea id="reporttext"></textarea></li>';
        html += '</ul>';
        html += '<div class="play_jb_4"><a href="javascript:void(0)" id="reportida" onclick="mp.report_get()">确认</a></div>';
        $('<div/>').appendTo('body').attr('id', 'overlay').css({'height': $(document).height(), 'opacity': '0.4'});
        $('<div/>').appendTo('body').attr('id', 'play_jb').html(html);
    },
    start: function () {
        $(window).on("unload", mp.unload);
        $.cookie('openPlayer', 1, {path: '/', domain: baseDomain});
        $.cookie('playdate', mp.date, {path: '/', domain: baseDomain});
        var url = (window.location.pathname.match(/[0-9_]+/g)) + '';
        P.temp = url;
        P.playid = info.id;
        P.list[0] = info.id + '$' + info.name;
        mp.player()
    }
};



var server = 'http://zj.djye.com/2021\/02\/037.m4a';
mp.start();
$(function () {
    Dj.type = 'play';
    Us.test();
    Dj.Lazy();
    Amy.bd();
    Amy.cs(0);
    mp.setid = setInterval(mp.setin, 1000);
    window.sharepic = '';
    Dj.Share(32);
    Dj.piao()
});